package com.yugao.fintech.framework.samples.ratelimit;

import com.yugao.fintech.framework.core.response.Resp;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/rate_limit")
public class RateLimitController {

    @RateLimit(key = "test", time = 10, count = 10, limitType = LimitTypeEnum.IP)
    @GetMapping("/get")
    public Resp<?> test() {
        return Resp.ok();
    }
}
